<template>
    <view class="h-578 menu pt-40">
        <view class="f jc-s-b">
            <view class="f fd-c ai-c menu-box"  @click='toWen'>
                <image
                    :src="getBaseUrl() + '/admin-api/system/file/19/get/3bb6bce05ab2457a19c370016aafe9b5763e1708c02346548457024209618540.png'"
                    class="w-100 h-100"
                ></image>
                <view class="mt-16 fs-26 fw-600 text-color6">快速问诊</view>
            </view>
            <view class="f fd-c ai-c menu-box" @click='toYi'>
                <image
                    :src="getBaseUrl() + '/admin-api/system/file/19/get/70572851893e86498f35d15eb08d75a82e3def3a6398ecb03dd859dc37327fd7.png'"
                    class="w-100 h-100"
                ></image>
                <view class="mt-16 fs-26 fw-600 text-color6">名医专家</view>
            </view>
            <view class="f fd-c ai-c menu-box" @click='toTiJian'>
                <image
                    :src="getBaseUrl() + '/admin-api/system/file/19/get/cda0924be912defa21a8e49d9440b1480c8ef99ebb78fb06f6b1429fb33b56fb.png'"
                    class="w-100 h-100"
                ></image>
                <view class="mt-16 fs-26 fw-600 text-color6">体检检测</view>
            </view>
            <view class="f fd-c ai-c menu-box" @click='toShop'>
                <image
                    :src="getBaseUrl() + '/admin-api/system/file/19/get/092bbeb01805e20e6bd0fd2dbc8a65cd2e8040b21def2b79e10a7e49c9fb63bf.png'"
                    class="w-100 h-100"
                ></image>
                <view class="mt-16 fs-26 fw-600 text-color6">健康药房</view>
            </view>
        </view>
		 <u-scroll-list indicatorActiveColor="#FABB3C">
        <view class="f jc-s-b mt-32">
            <view class="f fd-c ai-c menu2-box" @click="toDisease">
                <image src="http://cwht.ricecs.cn/app/index/jbzc.png" class="w-52 h-52"></image>
                <view class="mt-16 fs-24 fw-400 text-color6">疾病自查</view>
            </view>
            <view class="f fd-c ai-c menu2-box" @click="toMedication">
                <image src="http://cwht.ricecs.cn/app/index/yyzc.png" class="w-52 h-52"></image>
                <view class="mt-16 fs-24 fw-400 text-color6">用药自查</view>
            </view>
            <view class="f fd-c ai-c menu2-box"  @click="toText(8)">
                <image src="http://cwht.ricecs.cn/app/index/mcbx.png" class="w-52 h-52"></image>
                <view class="mt-16 fs-24 fw-400 text-color6">萌宠保险</view>
            </view>
            <view class="f fd-c ai-c menu2-box" @click="toCanEat">
                <image src="http://cwht.ricecs.cn/app/index/smnc.png" class="w-52 h-52"></image>
                <view class="mt-16 fs-24 fw-400 text-color6">什么能吃</view>
            </view>
            <view class="f fd-c ai-c menu2-box" @click="toCanDo">
                <image src="http://cwht.ricecs.cn/app/index/smnz.png" class="w-52 h-52"></image>
                <view class="mt-16 fs-24 fw-400 text-color6">什么能做</view>
            </view>
			<view class="f fd-c ai-c menu2-box" @click="toCanDo">
			    <image src="http://cwht.ricecs.cn/app/index/smnz.png" class="w-52 h-52"></image>
			    <view class="mt-16 fs-24 fw-400 text-color6">什么能做</view>
			</view>
			<view class="f fd-c ai-c menu2-box" @click="toCanDo">
			    <image src="http://cwht.ricecs.cn/app/index/smnz.png" class="w-52 h-52"></image>
			    <view class="mt-16 fs-24 fw-400 text-color6">什么能做</view>
			</view>
			<view class="f fd-c ai-c menu2-box" @click="toCanDo">
			    <image src="http://cwht.ricecs.cn/app/index/smnz.png" class="w-52 h-52"></image>
			    <view class="mt-16 fs-24 fw-400 text-color6">什么能做</view>
			</view>
        </view>
		 </u-scroll-list>
        <view class=" ml-20">
            <image
                :src="getBaseUrl() + '/admin-api/system/file/19/get/544c92de8e924f1ce060f46b4cb95c2bf9111c35cc866ad666ab81af2aed0907.png'"
                class="w-327 h-156 mr-16"
				@click="toDong"

            ></image>
            <image
                :src="getBaseUrl() + '/admin-api/system/file/19/get/8d8c92e17ee36d4b5d0842a36c5fc57f626902e54a944203e1b90dcdd4105e6e.png'"
                class="w-327 h-156 mr-16"
                @click="toCouponCenter"
            ></image>
        </view>
    </view>
</template>
<script setup lang="ts">
import { useAuthStore } from '@/store/modules/auth';
import { getBaseUrl } from '@/utils/env';
const authStore = useAuthStore();
//疾病自查
async function toDisease() {
    const type = await authStore.isLogin();
    if (!type) return;
    uni.navigateTo({
        url: '/pages_index/disease',
    });
}
//用药自查
async function toMedication() {
    const type = await authStore.isLogin();
    if (!type) return;
    uni.navigateTo({
        url: '/pages_index/medication',
    });
}
//能做
async function toCanDo() {
    const type = await authStore.isLogin();
    if (!type) return;
    uni.navigateTo({
        url: '/pages_index/canDo',
    });
}
//能吃
async function toCanEat() {
    const type = await authStore.isLogin();
    if (!type) return;
    uni.navigateTo({
        url: '/pages_index/canEat',
    });
}
//领券
async function toCouponCenter() {
    const type = await authStore.isLogin();
    if (!type) return;
    uni.navigateTo({
        url: '/pages_index/couponCenter',
    });
}
function toTiJian() {
    uni.switchTab({
        url: '/pages/serve/index',
    });
}
function toDong() {
    uni.switchTab({
        url: '/pages/novice/index',
    });
}
function toYi() {
    uni.navigateTo({
        url: '/pages_index/doctor',
    });
}
function toWen() {
    uni.navigateTo({
        url: '/pages_serve/chat/selectPet?id=1',
    });
}
function toShop() {
    uni.switchTab({
        url: '/pages/shop/index',
    });
}
function toText(type:number) {
    uni.navigateTo({
        url: '/pages_mine/text?type='+type,
    });
}
</script>

<style lang="scss" scoped>
.menu {
    background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 67%, #f5f5f5 100%);
    border-radius: 56px 56px 0 0;
    width: 100%;

    .menu-box {
        width: 25%;
    }

    .menu2-box {
        min-width: 142rpx;
    }
}
</style>
